home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deluxe Paint 5
/
Deluxe Paint V.iso
/
dpaintv_install
/
install-deluxepaintv
< prev
next >
Wrap
Text File
|
1997-11-04
|
17KB
|
514 lines
; $Id: Install-DeluxePaintV,v 1.7 94/08/10 15:58:27 lee Exp $
; $VER: Install-DeluxePaintV 1.7
;
; Copyright (c) 1994 Electronic Arts, Inc. All Rights Reserved.
(
(run "assign dpaintv_install: DPaintv:dpaintv_install")
(run "assign dpaintv_media: dpaintv:dpaintv_media")
(run "assign dpaintV_examples: dpaintv:dpaintv_examples")
(run "assign dpaintv_extras: dpaintv:dpaintv_extras")
)
(set app_prefix "DPaintV_")
(set app_disk1 "Install")
(set app_disk2 "Media")
(set app_disk3 "Examples")
(set app_disk4 "Extras")
(set app_volume1 (cat app_prefix app_disk1 ":"))
(set app_volume2 (cat app_prefix app_disk2 ":"))
(set app_volume3 (cat app_prefix app_disk3 ":"))
(set app_volume4 (cat app_prefix app_disk4 ":"))
(set expert_user_level 2)
(set orig_user_level @user-level)
; standard amiga error codes
(set RC_OK 0
RC_WARN 5
RC_ERROR 10
RC_FATAL 20
)
; program install options
(set INSTF_DPAINT 1
INSTF_DPLAYER 2)
;
; determine AmigaDos version and revision numbers
;
(set AmigaDos_Number (getversion))
(set AmigaDos_Version (/ AmigaDos_Number 65536))
(set AmigaDos_Revision (- AmigaDos_Number (* AmigaDos_Version 65536)))
;
; set up some message strings
;
(set format_msg
(cat
"Please insert an unused write-enabled floppy disk in drive "
"DF0 before clicking on the \"Proceed\" button. This will be "
"your destination disk.\n\n"
"When prompted for a source disk (i.e. \"DPaintV_Install\"), "
"place the source disk in any drive other than DF0\n\n"
)
)
(set format_help
(cat
format_msg
"Warning all data on the write-enabled floppy you provide "
"will be erased!\n\n"
"Please make sure that all your original DeluxePaintV "
"source disks are write-protected before proceeding!!"
)
)
; --------------------------------------------------------------------
; format_disk:
; standard floppy format procedure.
; if an error occurs during the format, a message will be put up
; and the user re-prompted.
;
; inputs:
; <DstDiskName> : The name to use when formatting the disk.
;
; outputs:
; <fmt_error> will be set to 0 if disk was formatted successfully,
; or some value <= RC_WARN if the user cancelled the format.
;
(procedure format_disk
(run "echo >ram:newline <nil: \"\"")
(run ("assign \"%s\" remove" (cat DstDisName ":")))
(user expert_user_level)
(set fmt_error RC_FATAL)
(until (<= fmt_error RC_WARN)
((set fmt_error
(run ("sys:system/format DRIVE DF0: NAME \"%s\" FFS NOICONS >NIL: <ram:newline" DstDiskName)
(help format_help)
(prompt (cat ("Creating disk \"%s\"...\n\n" DstDiskName) format_msg))
(confirm)
)
)
(transcript "format_result = " fmt_error)
(if (> fmt_error RC_WARN)
(message ("Error formatting disk \"%s\"" DstDiskName)))
))
(user orig_user_level)
(delete ram:newline)
)
; --------------------------------------------------------------------
(procedure setup_floppy_install
(user expert_user_level)
(message "The complete floppy disk installation requires 4 "
"unused disks. Please have your disks ready.\n\n"
"Warning: this install procedure assumes that you have "
"at least two disk drives."
)
(user orig_user_level)
)
; --------------------------------------------------------------------
(procedure setup_hd_install
(message
"\nYour copy of DeluxePaintV will be installed in a new drawer named "
"\"DPaintV\". You will be asked where on your hard drive (or "
"storage device) you want this drawer created.")
(set app_locate
(askdir
(prompt "Please indicate where you want the DPaintV drawer "
"to be located.")
(help @askdir-help)
(default @default-dest)
))
(set app_path (tackon app_locate "DPaintV"))
(makedir app_path (infos))
)
; --------------------------------------------------------------------
; copy_volume1
; copies files from <app_volume1> into the user's preselected
; destination directory. If we're doing a <hd_install> this procedure
; assumes <app_path> has already been set. If we're doing a
; floppy install, the files will be copied to the newly formatted
; 'DPaintV' disk.
;
; if either dpaint or dplayer are installed and catalogs directory
; will be created. This assumes that app_volume1 contains an empty
; catalogs directory and that the user will be prompted for language
; installation later.
;
(procedure copy_volume1
(complete 5)
(set program_options
(askoptions
(prompt "Which applications do you wish to install?")
(choices "DPaint" "DPlayer")
(help " DPaint -- installs DPaint and its support files\n"
" DPlayer -- installs DPaint Player Utility\n\n"
@askoptions-help)
)
)
(if (not hd_install)
((set DstDiskName "DPaintV")
(set app_path (cat DstDiskName ":"))
(if program_options
((format_disk)
(if fmt_error (set program_options 0))))))
(if (bitand INSTF_DPAINT program_options)
(copyfiles
(prompt "Copying DPaint and its support files...")
(source app_volume1)
(dest app_path)
(choices "DPaint" "Libs" "Fonts")
(help @copyfiles-help)
(infos)
(fonts)
))
(complete 10)
(if (bitand INSTF_DPLAYER program_options)
(copyfiles
(prompt "Copying DPlayer...")
(source app_volume1)
(dest app_path)
(choices "DPlayer")
(infos)
(help @copyfiles-help)
))
(set @default-dest app_path)
)
; --------------------------------------------------------------------
(procedure copy_dir
(copyfiles
(prompt ("Copying \"%s\"..." app_dir))
(source app_volume)
(dest app_path)
(choices app_dir)
(help @copyfiles-help)
(infos)
(fonts)
(optional)
)
)
; --------------------------------------------------------------------
; copy_volume2
; copies files from <app_volume2> into the user's preselected
; destination directory. If we're doing a <hd_install> this procedure
; assumes <app_path> has already been set. If we're doing a
; floppy install, the files will be copied to the newly formatted
; <app_disk2> disk.
;
(procedure copy_volume2
(complete 15)
(set options
(askoptions
(prompt "Which of the following directories do you wish to install?")
(choices "Media" "Textures" "Patterns" "Brush" "Move" "Colours")
(help " Media -- sample media types (chalk,oil,etc..)\n"
" Textures -- sample paper textures\n"
" Patterns -- sample fill patterns\n"
" Brush -- sample brushes\n"
" Move -- sample move templates\n"
" Colours -- sample colours/palettes\n"
"\n"
@askoptions-help)
)
)
(if options
(if (not hd_install)
((set DstDiskName app_disk2)
(set app_path (cat DstDiskName ":"))
(format_disk)
(if fmt_error (set options 0)))))
(set app_volume app_volume2)
(if (bitand 1 options)
((set app_dir "Media") (copy_dir)))
(complete 20)
(if (bitand 2 options)
((set app_dir "Textures") (copy_dir)))
(complete 25)
(if (bitand 4 options)
((set app_dir "Patterns") (copy_dir)))
(complete 30)
(if (bitand 8 options)
((set app_dir "Brush") (copy_dir)))
(complete 35)
(if (bitand 16 options)
((set app_dir "Move") (copy_dir)))
(complete 40)
(if (bitand 32 options)
((set app_dir "Colours") (copy_dir)))
)
; --------------------------------------------------------------------
; copy_volume3
; copies files from <app_volume3> into the user's preselected
; destination directory. If we're doing a <hd_install> this procedure
; assumes <app_path> has already been set. If we're doing a
;